// jmptest.cpp : Defines the entry point for the console application.
//

#define PLATFORM_X86_VC 


#include "stdafx.h"
#include <windows.h>
#include<stdio.h>
#include  "lscoroutin.h"
 

//////////////////////////////////////////////////////////////

static char mheap[1024*10];

static uint32_t mqueuebuf[1024];

static void mytask(void *name);



int main(void){
 	
	os_init((int)(&mheap[1024*10 -1]));
	
	os_createtask("task1", mytask, "task1", 512);
	os_createtask("task2", mytask, "task2", 512);
	os_runtasks();

    return 0;
	
}
  

int mtask1_flag = 0;
static void mytask(void *param){
	int starttick;

	os_task_init(param);
	printf("%s\n", param);
	starttick = 0;
	
	while (1){
		printf("%s ,tick=%d\n",(char*)param,starttick);
		os_msleep(1000);
		starttick += 1000;
//		mwaitflag_idle = 1;
	}
}
